<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<%@include file="/WEB-INF/common/taglib.jsp" %>
<%-- <%@include file="edit.jsp"%> --%>
<html>
<head>
<script type="text/javascript">
	$(function() {
		$('#toolbar').toolbar({buttons:[
			{name:'save',iconCls:'icon-save',text:'保存'}
	  	],handler:handler});
		
	});
	function handler() {
		switch(this.name) {
			case 'save': toSave();break;
		}
	}
	//添加界面的附件管理
	function toDeploy(item,title){
		showUpload({title:title
			,options:{
				filters:{
					mime_types: [{title : title, extensions : "jpg,png"}]
				},
				multi_selection: false ,
				 init:{
					 FileUploaded:function(uploader,file,responseObject){
						 var response = responseObject.response;
						 var json = eval('(' + response + ')');
						 var data = json.data;
						 var path = data.fileUrl;
						 showImg(item,path)
					 }
				},
				complete:function(){
					top.$ok('上传成功');
				}
			}
		});
	}
	function showImg(item,path){
		if(item == 'show_poster'){
			$("#input_poster").val(path);  //完成后更新已上传的文件列表
			$("#img_show_poster").attr("src",path);
		}else {
			$("#input_headurl").val(path);  //完成后更新已上传的文件列表
			$("#img_show_headUrl").attr("src",path);
		}
	}
	
	function toSave(){
		$.messager.progress({title:'系统提示',text:'数据处理中，请耐心等待...'});
		$.submit('#dataform',function(r) {
			$.messager.progress('close');
			if(r.code<0) return $alert(r.msg);
			top.$prompt('保存成功');
			top.$window.close(window,1,null);
		});
	}
	
</script>
</head>
<body>
	<div id="toolbar" class="toolbar" ></div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false">
			<form id="dataform" action="edit" method="post">
				<input type="hidden" name="entity.id" value="${item.id }" />
				<table class="form-tbl">
					<tr class="form-tr">
						<th class="form-th">项目名称:</th>
						<td class="form-td">
							<input name="entity.projectName" value="${item.projectName }" class="easyui-textbox" style="width:170px;" />
						</td>
					</tr>
					<tr>
						<th class="form-th">项目短描述:</th>
						<td class="form-td">
							<input name="entity.shortDescribe" data-options="multiline:true,required:true" value="${item.shortDescribe}" class="easyui-textbox" style="width: 80% ;"/>
						</td>
					</tr>
					<tr>
						<th class="form-th">项目详情:</th>
						<td class="form-td">
							<input name="entity.projectDetail" data-options="multiline:true,required:true" value="${item.projectDetail}" class="easyui-textbox" style="width: 80% ;height: 150px ;"/>
						</td>
					</tr>
					<tr>
						<th class="form-th">对接要求:</th>
						<td class="form-td">
							<input name="entity.receiveRequired" data-options="multiline:true,required:true" value="${item.receiveRequired}" class="easyui-textbox" style="width: 80% ;height: 150px ;" />
						</td>
					</tr>
					<tr>
						<th class="form-th">有效时间:</th>
						<td class="form-td">
							<input name="entity.effectiveTime" value="${item.effectiveTime}" class="easyui-datetimebox" style="width: 200px ; "/>
						</td>
					</tr>
					<tr>
						<th class="form-th">项目标签:</th>
						<td class="form-td">
							<select class="easyui-combobox"name="entity.projectTag" value="${item.projectTag }" style="width:200px;">
								<c:forEach items="${tags}" var="myi">
									<option value="${myi.id}" ${item.projectTag==myi.id?'selected':''}>${myi.tagName}</option>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">项目状态:</th>
						<td >
							<select class="easyui-combobox" name="entity.projectStatus" value="${item.projectStatus}" style="width:200px;">
								<option value="1" ${item.projectStatus=="1"?'selected':''}>审核中</option>
								<option value="2" ${item.projectStatus=="2"?'selected':''}>通过</option>
								<option value="3" ${item.projectStatus=="3"?'selected':''}>退回</option>
								<option value="4" ${item.projectStatus=="4"?'selected':''}>删除</option>
							</select>
						</td>
					</tr>
					<tr>
					</tr>
					<tr class="form-tr">
						<th class="form-th">所属公司:</th>
						<td class="form-td">
							<input class="easyui-combogrid" value="${item.belongCompany}" name="entity.belongCompany" style="width:250px" data-options=" required:true,
								panelWidth: 500,
								idField: 'id',
								textField: 'comName',
								url: '/zhaoshang/company/directory/getAllCompany',
								method: 'post',
								columns: [[
									{field:'comName',title:'企业名称',width:120},
									{field:'personIncharge',title:'对接人职务',width:120,align:'right'},
									{field:'inchargeTel',title:'联系电话',width:150,align:'right'},
									{field:'point',title:'积分',width:60,align:'center'}
								]],
								fitColumns: true
							"/>
						</td>
					</tr>
				</table>
			</form>
			
		</div>
	</div>
</body>
</html>